/* Header 样式 */
.header {
    background-color: #283593;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

/* Logo 部分 */
.header-logo {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    color: white;
}

.header-subtitle {
    font-size: 0.8rem;
    color: #bbdefb;
    margin-top: 2px;
}

/* 导航菜单 */
.header-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    margin-left: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-block;
    padding: 5px 0;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #64b5f6;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #bbdefb;
}

.nav-link:hover::after {
    width: 100%;
}

/* 下拉菜单 */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1e3a8a;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    overflow: hidden;
    z-index: 100;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #1a365d;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    flex-direction: column;
    justify-content: space-around;
    height: 30px;
    width: 30px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-nav {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #283593;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .header-nav.active {
        max-height: 500px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .nav-list {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .nav-item {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .nav-link {
        width: 100%;
        padding: 10px;
    }

    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        background-color: #1e3a8a;
        width: 100%;
    }

    .dropdown:hover .dropdown-content {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}
